import { useAxios } from '@/hooks/web/useAxios'
import { ProSludgeVO,ProSludgePageReqVO,ProSludgeExcelReqVO } from './types'

const request = useAxios()

// 查询污泥生产列表
export const getProSludgePageApi = async (params: ProSludgePageReqVO) => {
    return await request.get({ url: '/water/pro-sludge/page', params })
}

// 查询污泥生产详情
export const getProSludgeApi = async (id: number) => {
    return await request.get({ url: '/water/pro-sludge/get?id=' + id })
}

// 新增污泥生产
export const createProSludgeApi = async (data: ProSludgeVO) => {
    return await request.post({ url: '/water/pro-sludge/create', data })
}

// 修改污泥生产
export const updateProSludgeApi = async (data: ProSludgeVO) => {
    return await request.put({ url: '/water/pro-sludge/update', data })
}

// 删除污泥生产
export const deleteProSludgeApi = async (id: number) => {
    return await request.delete({ url: '/water/pro-sludge/delete?id=' + id })
}

// 导出污泥生产 Excel
export const exportProSludgeApi = async (params: ProSludgeExcelReqVO) => {
    return await request.download({ url: '/water/pro-sludge/export-excel', params })
}
